<?php
/* @var $this MedicoController */
/* @var $model Medico */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'medico-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Los campos con <span class="required">*</span> son requeridos.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<div class="span-9">
			<?php echo $form->labelEx($model,'nombre'); ?>
			<?php echo $form->textField($model,'nombre',array('size'=>50,'maxlength'=>50)); ?>
			<?php echo $form->error($model,'nombre'); ?>
		</div>
		<div class="span-8">
			<?php echo $form->labelEx($model,'especialidad'); ?>
			<?php echo $form->dropDownList($model,'especialidad',CHtml::listData(Especialidad::model()->findAll(array('order'=>'descripcion')),'codigo','descripcion'),array('empty'=>'Seleccione una especialidad',)); ?>
			<?php echo $form->error($model,'especialidad'); ?>
		</div>
	</div>

	<div class="row">
		<div class="span-17">
			<?php echo $form->labelEx($model,'direccion'); ?>
			<?php echo $form->textField($model,'direccion',array('size'=>60,'maxlength'=>100)); ?>
			<?php echo $form->error($model,'direccion'); ?>
		</div>
	</div>

	<div class="row">
		<div class="span-17">
			<?php echo $form->labelEx($model,'nota'); ?>
			<?php echo $form->textArea($model,'nota',array('rows'=>6, 'cols'=>50)); ?>
			<?php echo $form->error($model,'nota'); ?>
		</div>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Crear' : 'Guardar'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->